Skip to content

Revert "fix incorrect byte count suffix on MSVC" - #165856

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
JonathanBrouwer:revert18
Nov 12, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
JonathanBrouwer:revert18

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Reverts #165458 because of a performance regression.

This reverts commit 6274635, reversing
changes made to a7e0b2e.
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 12, 2026
@JonathanBrouwer JonathanBrouwer self-assigned this Nov 12, 2026
@rustbot

rustbot commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

r? @mati865

rustbot has assigned @mati865.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 79 candidates
  • Random selection from 18 candidates

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

Clean revert.
@bors r+ rollup=never p=6
Scheduling this before the mini rollup

@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0670d02 has been tentatively approved by JonathanBrouwer

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=6 force

@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0670d02 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 12, 2026
@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 6m 16s
Pushing 29a5d06 to main...

@rust-bors
rust-bors Bot merged commit 29a5d06 into rust-lang:main Nov 12, 2026
15 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing b4fe65c (parent) -> 29a5d06 (this PR)

Test differences

Show 18 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/msvc-x86-callconv-byte-count.rs#gnu: pass -> [missing] (J1)
  • [codegen] tests/codegen-llvm/msvc-x86-callconv-byte-count.rs#msvc: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/linking/msvc-callconv-export-prefixes.rs#i686: pass -> [missing] (J3)
  • [ui (polonius)] tests/ui/linking/msvc-callconv-export-prefixes.rs#x86_64: pass -> [missing] (J3)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#i686: pass -> [missing] (J3)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#x86_64: pass -> [missing] (J3)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#i686: ignore (ignored on targets without Rust's LLD) -> [missing] (J6)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#x86_64: ignore (ignored on targets without Rust's LLD) -> [missing] (J6)

Stage 2

  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#i686: pass -> [missing] (J0)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#x86_64: pass -> [missing] (J0)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#i686: ignore (gcc backend is marked as ignore) -> [missing] (J2)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#x86_64: ignore (gcc backend is marked as ignore) -> [missing] (J2)
  • [codegen] tests/codegen-llvm/msvc-x86-callconv-byte-count.rs#gnu: pass -> [missing] (J4)
  • [codegen] tests/codegen-llvm/msvc-x86-callconv-byte-count.rs#msvc: pass -> [missing] (J4)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#i686: ignore (ignored on targets without Rust's LLD) -> [missing] (J5)
  • [ui] tests/ui/linking/msvc-callconv-export-prefixes.rs#x86_64: ignore (ignored on targets without Rust's LLD) -> [missing] (J5)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 29a5d066d98b58d948d285ba22390a5f849f5938 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-s390x-linux: 59m 44s -> 1h 37m (+62.4%)
  2. test-x86_64-rust-for-linux: 1h 4m -> 31m 44s (-50.6%)
  3. dist-loongarch64-linux: 1h 19m -> 1h 58m (+48.8%)
  4. test-pr-check-2: 26m -> 38m 14s (+47.1%)
  5. dist-i686-linux: 1h 14m -> 1h 49m (+47.0%)
  6. test-arm-android: 1h 13m -> 1h 47m (+46.7%)
  7. test-x86_64-gnu-aux: 1h 49m -> 2h 39m (+45.4%)
  8. test-x86_64-gnu-stdlib-semver-check: 15m 57s -> 9m 2s (-43.4%)
  9. test-x86_64-gnu-llvm-22-1: 1h 24m -> 48m 10s (-42.8%)
  10. dist-x86_64-netbsd: 1h 8m -> 1h 38m (+42.7%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown

Finished benchmarking commit (29a5d06): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-3.6%, -0.2%] 35
Improvements ✅
(secondary)
-1.4% [-8.4%, -0.3%] 43
All ❌✅ (primary) -1.1% [-3.6%, -0.2%] 35

Max RSS (memory usage)

Results (primary -3.6%, secondary -4.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.5% [1.4%, 5.7%] 3
Regressions ❌
(secondary)
6.3% [5.4%, 7.1%] 3
Improvements ✅
(primary)
-4.5% [-12.9%, -1.7%] 23
Improvements ✅
(secondary)
-5.9% [-15.6%, -2.0%] 35
All ❌✅ (primary) -3.6% [-12.9%, 5.7%] 26

Cycles

Results (primary -3.0%, secondary -5.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.0% [-5.6%, -2.2%] 12
Improvements ✅
(secondary)
-5.9% [-20.3%, -2.0%] 17
All ❌✅ (primary) -3.0% [-5.6%, -2.2%] 12

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 482.212s -> 484.783s (0.53%)
Artifact size: 406.08 MiB -> 406.09 MiB (0.00%)

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 16, 2026
…-v2, r=folkertdev

fix MSVC calling convention byte counts

performance fixed version of rust-lang#165458
original fix _reverted_ in rust-lang#165856 due to perf issues.

fixes rust-lang#165299
companion test pr: rust-lang#165771

the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling.

perf: local rustc-perf benchmarks on aarch64 (instructions:u):
original fix: +0.83%
optimized fix: ~0.00%

testing:
fastcall, stdcall and vectorcall codegen tests
i686/x86_64 msvc linking with and without thinlto, verified dll exports
lto smoke tests
also handles `\x01`-prefixed symbols under thinlto (related: rust-lang#165790).

r? @folkertdev
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 16, 2026
…-v2, r=folkertdev

fix MSVC calling convention byte counts

performance fixed version of rust-lang#165458
original fix _reverted_ in rust-lang#165856 due to perf issues.

fixes rust-lang#165299
companion test pr: rust-lang#165771

the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling.

perf: local rustc-perf benchmarks on aarch64 (instructions:u):
original fix: +0.83%
optimized fix: ~0.00%

testing:
fastcall, stdcall and vectorcall codegen tests
i686/x86_64 msvc linking with and without thinlto, verified dll exports
lto smoke tests
also handles `\x01`-prefixed symbols under thinlto (related: rust-lang#165790).

r? @folkertdev
rust-bors Bot pushed a commit that referenced this pull request Nov 16, 2026
Rollup merge of #165881 - paradoxicalguy:fix-msvc-byte-count-v2, r=folkertdev

fix MSVC calling convention byte counts

performance fixed version of #165458
original fix _reverted_ in #165856 due to perf issues.

fixes #165299
companion test pr: #165771

the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling.

perf: local rustc-perf benchmarks on aarch64 (instructions:u):
original fix: +0.83%
optimized fix: ~0.00%

testing:
fastcall, stdcall and vectorcall codegen tests
i686/x86_64 msvc linking with and without thinlto, verified dll exports
lto smoke tests
also handles `\x01`-prefixed symbols under thinlto (related: #165790).

r? @folkertdev
sushink70 pushed a commit to sushink70/miri that referenced this pull request Nov 17, 2026
…lkertdev

fix MSVC calling convention byte counts

performance fixed version of rust-lang/rust#165458
original fix _reverted_ in rust-lang/rust#165856 due to perf issues.

fixes rust-lang/rust#165299
companion test pr: rust-lang/rust#165771

the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling.

perf: local rustc-perf benchmarks on aarch64 (instructions:u):
original fix: +0.83%
optimized fix: ~0.00%

testing:
fastcall, stdcall and vectorcall codegen tests
i686/x86_64 msvc linking with and without thinlto, verified dll exports
lto smoke tests
also handles `\x01`-prefixed symbols under thinlto (related: rust-lang/rust#165790).

r? @folkertdev
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Nov 23, 2026
…lkertdev

fix MSVC calling convention byte counts

performance fixed version of rust-lang/rust#165458
original fix _reverted_ in rust-lang/rust#165856 due to perf issues.

fixes rust-lang/rust#165299
companion test pr: rust-lang/rust#165771

the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling.

perf: local rustc-perf benchmarks on aarch64 (instructions:u):
original fix: +0.83%
optimized fix: ~0.00%

testing:
fastcall, stdcall and vectorcall codegen tests
i686/x86_64 msvc linking with and without thinlto, verified dll exports
lto smoke tests
also handles `\x01`-prefixed symbols under thinlto (related: rust-lang/rust#165790).

r? @folkertdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants